package cn.kkcxy.blog.server;

import cn.kkcxy.blog.common.constant.ApplicationLogConstant;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @BelongsProject: kkcxy-blog
 * @BelongsPackage: cn.kkcxy.blog.server
 * @Author: kkcxy
 * @CreateTime: 2024-09-07 12:50
 * @Description: Blog 启动类
 * @Version: 1.0
 */
@Slf4j
@EnableAsync
@ComponentScan(basePackages = {"cn.kkcxy.blog"})
@MapperScan("cn.kkcxy.blog.system.mapper")
@SpringBootApplication
public class BlogApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(BlogApplication.class, args);
        // 输出 Knife4j 日志
        ApplicationLogConstant.logApplicationStartup(applicationContext.getEnvironment());
    }

}
